<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 6.2.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.3/css/all.min.css" integrity="sha256-2H3fkXt6FEmrReK448mDVGKb3WW2ZZw35gI7vqHOE4Y=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"singingxy.github.io","root":"/","images":"/images","scheme":"Gemini","version":"8.6.1","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"}}</script><script src="/js/config.js"></script>
<meta name="description" content="github 报了安全警报，又到了升级的时候。于是升级 hexo，升级完运行hexo server的时候，出来的不是我的博客界面，而是未生成的模板 12345678910&amp;#123;% extends &amp;#x27;_layout.swig&amp;#x27; %&amp;#125; &amp;#123;% import &amp;#x27;_macro&#x2F;post.swig&amp;#x27; as post_template %&amp;#12">
<meta property="og:type" content="article">
<meta property="og:title" content="一个next主题版本产生的错误">
<meta property="og:url" content="https://singingxy.github.io/2021/%E4%B8%80%E4%B8%AAnext%E4%B8%BB%E9%A2%98%E7%89%88%E6%9C%AC%E4%BA%A7%E7%94%9F%E7%9A%84%E9%94%99%E8%AF%AF/index.html">
<meta property="og:site_name" content="sing&#39;s blog">
<meta property="og:description" content="github 报了安全警报，又到了升级的时候。于是升级 hexo，升级完运行hexo server的时候，出来的不是我的博客界面，而是未生成的模板 12345678910&amp;#123;% extends &amp;#x27;_layout.swig&amp;#x27; %&amp;#125; &amp;#123;% import &amp;#x27;_macro&#x2F;post.swig&amp;#x27; as post_template %&amp;#12">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-07-12T09:28:50.000Z">
<meta property="article:modified_time" content="2021-07-12T09:28:50.000Z">
<meta property="article:author" content="Sing">
<meta property="article:tag" content="hexo">
<meta property="article:tag" content="next">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="https://singingxy.github.io/2021/%E4%B8%80%E4%B8%AAnext%E4%B8%BB%E9%A2%98%E7%89%88%E6%9C%AC%E4%BA%A7%E7%94%9F%E7%9A%84%E9%94%99%E8%AF%AF/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://singingxy.github.io/2021/%E4%B8%80%E4%B8%AAnext%E4%B8%BB%E9%A2%98%E7%89%88%E6%9C%AC%E4%BA%A7%E7%94%9F%E7%9A%84%E9%94%99%E8%AF%AF/","path":"/2021/一个next主题版本产生的错误/","title":"一个next主题版本产生的错误"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>一个next主题版本产生的错误 | sing's blog</title>
  




  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <h1 class="site-title">sing's blog</h1>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">C'est La Vie Mon Ami.</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>







</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-overview-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-overview">
            <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">Sing</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives">
          <span class="site-state-item-count">18</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
        <span class="site-state-item-count">2</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
        <span class="site-state-item-count">25</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



          </div>
        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://singingxy.github.io/2021/%E4%B8%80%E4%B8%AAnext%E4%B8%BB%E9%A2%98%E7%89%88%E6%9C%AC%E4%BA%A7%E7%94%9F%E7%9A%84%E9%94%99%E8%AF%AF/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="Sing">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="sing's blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          一个next主题版本产生的错误
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2021-07-12 17:28:50" itemprop="dateCreated datePublished" datetime="2021-07-12T17:28:50+08:00">2021-07-12</time>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <p>github 报了安全警报，又到了升级的时候。<br>于是升级 hexo，升级完运行<code>hexo server</code>的时候，出来的不是我的博客界面，而是未生成的模板</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">&#123;% extends &#x27;_layout.swig&#x27; %&#125; &#123;% import &#x27;_macro/post.swig&#x27; as post_template %&#125; &#123;% import &#x27;_macro/sidebar.swig&#x27; as</span><br><span class="line">sidebar_template %&#125; &#123;% block title %&#125;&#123;&#123; config.title &#125;&#125;&#123;% if theme.index_with_subtitle and config.subtitle %&#125; -</span><br><span class="line">&#123;&#123;config.subtitle &#125;&#125;&#123;% endif %&#125;&#123;% endblock %&#125; &#123;% block page_class %&#125; &#123;% if is_home() %&#125;page-home&#123;% endif -%&#125; &#123;% endblock</span><br><span class="line">%&#125; &#123;% block content %&#125;</span><br><span class="line"><span class="tag">&lt;<span class="name">section</span> <span class="attr">id</span>=<span class="string">&quot;posts&quot;</span> <span class="attr">class</span>=<span class="string">&quot;posts-expand&quot;</span>&gt;</span></span><br><span class="line">  &#123;% for post in page.posts %&#125; &#123;&#123; post_template.render(post, true) &#125;&#125; &#123;% endfor %&#125;</span><br><span class="line"><span class="tag">&lt;/<span class="name">section</span>&gt;</span></span><br><span class="line"></span><br><span class="line">&#123;% include &#x27;_partials/pagination.swig&#x27; %&#125; &#123;% endblock %&#125; &#123;% block sidebar %&#125; &#123;&#123; sidebar_template.render(false) &#125;&#125; &#123;%</span><br><span class="line">endblock %&#125;</span><br></pre></td></tr></table></figure>

<p>这不就废了嘛，以为是 guthub 访问不畅文件下载不全，又重新下了两次，依然是这样。<br>经过搜索后得到答案，需要下载更高版本的 next 主题<br>下载最新版的方法可以参考<a target="_blank" rel="noopener" href="https://theme-next.js.org/docs/getting-started/installation.html">https://theme-next.js.org/docs/getting-started/installation.html</a><br>直接下了个最新版的 next 主题，运行<code>hexo server</code>，漂亮的主题回来了。</p>
<p>关于 next 主题还有一些事没有完成<br>个性化定制的 next 文件还是应该同步到 github 上面存放，不然换个电脑就没了，得找时间完善这个事。</p>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/hexo/" rel="tag"># hexo</a>
              <a href="/tags/next/" rel="tag"># next</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2021/Windows%E4%B8%8B%E4%BD%BF%E7%94%A8GitBash%E6%80%8E%E4%B9%88%E9%80%89%E6%8B%A9%E9%80%89%E9%A1%B9/" rel="prev" title="Windows下使用GitBash运行vue/cli怎么选择选项">
                  <i class="fa fa-chevron-left"></i> Windows下使用GitBash运行vue/cli怎么选择选项
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2022/%E4%BD%BF%E7%94%A8sass%E8%BF%9B%E8%A1%8CHSL%E8%AE%A1%E7%AE%97/" rel="next" title="使用sass进行HSL计算">
                  使用sass进行HSL计算 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Sing</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script>

  




  





</body>
</html>
